1. Field of the Invention
The present invention relates generally to the field of digitizing oscilloscopes. More specifically, the present invention discloses an apparatus to provide a very fast autoscale or automatic setup feature for a digitizing oscilloscope.
2. Statement of the Problem
Digitizing oscilloscopes often have an autoscale or automatic setup feature that is used to automatically analyze the input signals connected to the oscilloscope, and then set the sweep speed and vertical sensitivity settings appropriately to best display these input signals. The traditional approach used by conventional digitizing oscilloscopes has been a software oriented technique. For example, the internal microprocessor in the oscilloscope would be used to execute an algorithm similar to the following:
1. Set each input channel to minimum gain sensitivity. PA0 2. Digitize and collect untriggered waveform records for each input channel (typically one sample is stored for each series of N samples digitized by the A/D converter), and then parse through each record looking for a first-pass estimate of the input signal maximum and minimum values. If the signal is yet to small, increase the gain sensitivity and repeat, as needed. PA0 3. Choose a trigger source from the input channels with activity, and set the trigger level for that channel appropriately. PA0 4. Again, collect waveform records for each channel using triggered acquisitions, starting at the fastest available sweep speeds. PA0 4Parse through these records, noting signal extremes and input frequency. Adjust the channel gain and sweep speed accordingly, and repeat as needed.
Unfortunately, this software approach has a number of shortcomings. First, the algorithm described above is often quite slow. The microprocessor often needs to search through quite a bit of data. For example, consider the task of determining the maximum and minimum vales of the following signal during an autoscale operation:
______________________________________ Maximum A/D sample rate: 10.sup.7 samples/sec. Waveform record length: 1000 points Input signal: square wave Frequency 100 KHz Width 200 nsec. ______________________________________
Using the conventional approach, the microprocessor scales the A/D sampling rate to 100 KHz (i.e., 1/100th of the maximum A/D sample rate), the collects 10 mS, 1000 point untriggered records. The microprocessor then watches through these records searching for input signal extremes. Since the time resolution between stored samples is 1/100 KHz=10 .mu.s, it will be necessary to repeat this process at least 10 .mu.s / 200 nsec=50 times before being reasonably certain that the minimum and maximum values have been found.
The conventional approach also requires the microprocessor to start the search for the appropriate sweep speed at the fastest possible timebase setting to prevent signal aliasing (i.e., a situation where the signal digitized and displayed by the oscilloscope bears no real relationship to the input signal). Starting with the fastest sweep rate, triggered data acquisitions are taken and the microprocessor searches through the resulting data looking for signal edges to estimate the input signal frequency. Since the microprocessor operates on digitized samples, care must be taken to avoid signal aliasing, which may occur whenever the input signal frequency is above the Nyquist limit as determined by the effective store rate of digitized samples into memory. Thus, the conventional approach typically requires numerous repetitions of the sampling process at progressively decreasing sweep rates until the input signal frequency is known.
Second, this approach is prone to errors, or to miss signals entirely. Since the algorithm is rather slow, the input signal can change quite substantially during the autoscale operation. The algorithm may make certain decisions based on input signals at the start of the search that could be quite invalid several seconds later. Worse yet, low duty cycle signals could be entirely missed. In other words, at slower sweep speeds the acquisition system typically throws away far more samples from the A/D converter than it stores and displays. A very low duty cycle is quite likely to be contained in this ignored data.
3. Solution to the Problem
The present invention improves upon conventional d . oscilloscopes by adding global peak detecting logic capable of running at the maximum A/D sampling rate (e.g. 10 MHz), and by adding a trigger counter at the hardware level to eliminate the edge finding process heretofore done in software by the microprocessor. Since the peak detector operates at the same frequency as the A/D converter, each and every sample is tested for signal extremes and only one pass is required. This is in contrast to the conventional oversampling approach in which only one sample is stored in memory for later processing by the microprocessor out of each series of N samples produced by the A/D converter. As outlined above, the conventional oversampling approach typically requires numerous repetitions of the sampling process to ensure that accurate maximum and minimum value have been found. In addition, even the fastest microprocessor would be many times slower at interpreting stored data than would be the case for dedicated peak detecting circuitry analyzing samples on the fly.
The trigger counter substantially eliminates the problem of signal aliasing that accompanies the conventional approach. Here, the edge finding process is done directly by hardware. Qualified trigger events are directly used to clock the trigger counter. Since this trigger signal is never digitized, all possibility of signal aliasing is eliminated. The oscilloscope microprocessor simply resets the trigger counter, waits a predetermined period of time, and then reads the resulting count. The conventional approach of repeated data acquisitions and processing by the microprocessor to estimate the input signal frequency is completely eliminated.
These improvements allow a digitizing oscilloscope to achieve a substantial improvement in the amount of time required to autoscale. Prototypes of the present invention have seen time periods of up to 10 seconds reduced to fractions of a second (using four input channels, over 50 Hz to 100 MHz).